﻿using System;
using System.Xml.Serialization;


/// <remarks/>
[System.Xml.Serialization.XmlRootAttribute("data")]
public class timeline 
{
    
	public timeline(){}

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("event")]
    public eventCollection events;
}

/// <remarks/>
public class @event 
{
	public @event(){}

	public @event(DateTime start, DateTime end, bool isDuration, string title, string link)
	{
		this.start = start;
		this.startStringSpecified = true;
		this.end = end;
		this.isDuration = isDuration;
		this.title = title;
		this.link = link;
	}

	public @event(DateTime start, bool isDuration, string title, string link)
	{
		this.start = start;
		this.startStringSpecified = true;
		this.isDuration = isDuration;
		this.title = title;
		this.link = link;
	}

	const string DATEFORMAT = @"MMM dd yyyy hh\:mm\:ss \G\M\T";

	[System.Xml.Serialization.XmlAttributeAttribute("start")]
	public string startString
	{
		get
		{
			return start.ToString(DATEFORMAT,System.Globalization.CultureInfo.InvariantCulture);
		}
		set
		{
			start = DateTime.ParseExact(value,DATEFORMAT,System.Globalization.CultureInfo.InvariantCulture);
			startStringSpecified = true;
		}
	}

	[System.Xml.Serialization.XmlAttributeAttribute("end")]
	public string endString
	{
		get
		{
			return end.ToString(DATEFORMAT,System.Globalization.CultureInfo.InvariantCulture);
		}
		set
		{
			endStringSpecified = true;
			end = DateTime.ParseExact(value,DATEFORMAT,System.Globalization.CultureInfo.InvariantCulture);
		}
	}

	[XmlIgnore] 
	public DateTime start;

	[XmlIgnore] 
	public DateTime end;

	[System.Xml.Serialization.XmlAttributeAttribute("isDuration")]
	public bool isDuration = false;

	[XmlIgnore] 
	public bool startStringSpecified = false;

	[XmlIgnore] 
	public bool endStringSpecified = false;

	[System.Xml.Serialization.XmlAttributeAttribute("title")]
	public string title = "";

	[System.Xml.Serialization.XmlAttributeAttribute("link")]
	public string link = "";

	[System.Xml.Serialization.XmlAttributeAttribute("image")]
	public string image = "";

	[System.Xml.Serialization.XmlText]
	public string text = "";

}

    /// <summary>
    /// A collection of elements of type @event
    /// </summary>
public class @eventCollection: System.Collections.CollectionBase
{
	/// <summary>
	/// Initializes a new empty instance of the @eventCollection class.
	/// </summary>
	public @eventCollection()
	{
		// empty
	}

	/// <summary>
	/// Initializes a new instance of the @eventCollection class, containing elements
	/// copied from an array.
	/// </summary>
	/// <param name="items">
	/// The array whose elements are to be added to the new @eventCollection.
	/// </param>
	public @eventCollection(@event[] items)
	{
		this.AddRange(items);
	}

	/// <summary>
	/// Initializes a new instance of the @eventCollection class, containing elements
	/// copied from another instance of @eventCollection
	/// </summary>
	/// <param name="items">
	/// The @eventCollection whose elements are to be added to the new @eventCollection.
	/// </param>
	public @eventCollection(@eventCollection items)
	{
		this.AddRange(items);
	}

	/// <summary>
	/// Adds the elements of an array to the end of this @eventCollection.
	/// </summary>
	/// <param name="items">
	/// The array whose elements are to be added to the end of this @eventCollection.
	/// </param>
	public virtual void AddRange(@event[] items)
	{
		foreach (@event item in items)
		{
			this.List.Add(item);
		}
	}

	/// <summary>
	/// Adds the elements of another @eventCollection to the end of this @eventCollection.
	/// </summary>
	/// <param name="items">
	/// The @eventCollection whose elements are to be added to the end of this @eventCollection.
	/// </param>
	public virtual void AddRange(@eventCollection items)
	{
		foreach (@event item in items)
		{
			this.List.Add(item);
		}
	}

	/// <summary>
	/// Adds an instance of type @event to the end of this @eventCollection.
	/// </summary>
	/// <param name="value">
	/// The @event to be added to the end of this @eventCollection.
	/// </param>
	public virtual void Add(@event value)
	{
		this.List.Add(value);
	}

	/// <summary>
	/// Determines whether a specfic @event value is in this @eventCollection.
	/// </summary>
	/// <param name="value">
	/// The @event value to locate in this @eventCollection.
	/// </param>
	/// <returns>
	/// true if value is found in this @eventCollection;
	/// false otherwise.
	/// </returns>
	public virtual bool Contains(@event value)
	{
		return this.List.Contains(value);
	}

	/// <summary>
	/// Return the zero-based index of the first occurrence of a specific value
	/// in this @eventCollection
	/// </summary>
	/// <param name="value">
	/// The @event value to locate in the @eventCollection.
	/// </param>
	/// <returns>
	/// The zero-based index of the first occurrence of the _ELEMENT value if found;
	/// -1 otherwise.
	/// </returns>
	public virtual int IndexOf(@event value)
	{
		return this.List.IndexOf(value);
	}

	/// <summary>
	/// Inserts an element into the @eventCollection at the specified index
	/// </summary>
	/// <param name="index">
	/// The index at which the @event is to be inserted.
	/// </param>
	/// <param name="value">
	/// The @event to insert.
	/// </param>
	public virtual void Insert(int index, @event value)
	{
		this.List.Insert(index, value);
	}

	/// <summary>
	/// Gets or sets the @event at the given index in this @eventCollection.
	/// </summary>
	public virtual @event this[int index]
	{
		get
		{
			return (@event) this.List[index];
		}
		set
		{
			this.List[index] = value;
		}
	}

	/// <summary>
	/// Removes the first occurrence of a specific @event from this @eventCollection.
	/// </summary>
	/// <param name="value">
	/// The @event value to remove from this @eventCollection.
	/// </param>
	public virtual void Remove(@event value)
	{
		this.List.Remove(value);
	}

	/// <summary>
	/// Type-specific enumeration class, used by @eventCollection.GetEnumerator.
	/// </summary>
	public class Enumerator: System.Collections.IEnumerator
	{
		private System.Collections.IEnumerator wrapped;

		public Enumerator(@eventCollection collection)
		{
			this.wrapped = ((System.Collections.CollectionBase)collection).GetEnumerator();
		}

		public @event Current
		{
			get
			{
				return (@event) (this.wrapped.Current);
			}
		}

		object System.Collections.IEnumerator.Current
		{
			get
			{
				return (@event) (this.wrapped.Current);
			}
		}

		public bool MoveNext()
		{
			return this.wrapped.MoveNext();
		}

		public void Reset()
		{
			this.wrapped.Reset();
		}
	}

	/// <summary>
	/// Returns an enumerator that can iterate through the elements of this @eventCollection.
	/// </summary>
	/// <returns>
	/// An object that implements System.Collections.IEnumerator.
	/// </returns>        
	public new virtual @eventCollection.Enumerator GetEnumerator()
	{
		return new @eventCollection.Enumerator(this);
	}
}

